home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / programacao / visual / perl.exe / {app} / Webroot / cgi-bin / popup.cgi < prev    next >
Encoding:
Text File  |  2003-01-11  |  1.0 KB  |  34 lines

  1. #!perl
  2.  
  3. use CGI;
  4.  
  5. $query = new CGI;
  6. print $query->header;
  7. print $query->start_html('Popup Window');
  8.  
  9.  
  10. if (!$query->param) {
  11.     print "<H1>Ask your Question</H1>\n";
  12.     print $query->startform(-target=>'_new');
  13.     print "What's your name? ",$query->textfield('name');
  14.     print "<P>What's the combination?<P>",
  15.     $query->checkbox_group(-name=>'words',
  16.                -values=>['eenie','meenie','minie','moe'],
  17.                -defaults=>['eenie','moe']);
  18.  
  19.     print "<P>What's your favorite color? ",
  20.     $query->popup_menu(-name=>'color',
  21.                -values=>['red','green','blue','chartreuse']),
  22.     "<P>";
  23.     print $query->submit;
  24.     print $query->endform;
  25.  
  26. } else {
  27.     print "<H1>And the Answer is...</H1>\n";
  28.     print "Your name is <EM>",$query->param(name),"</EM>\n";
  29.     print "<P>The keywords are: <EM>",join(", ",$query->param(words)),"</EM>\n";
  30.     print "<P>Your favorite color is <EM>",$query->param(color),"</EM>\n";
  31. }
  32. print qq{<P><A HREF="cgi_docs.html">Go to the documentation</A>};
  33. print $query->end_html;
  34.